<?php

defined( 'ABSPATH' ) || exit;
?>
		
<div id="fh5co-blog-section">
	<div class="container">
		<div class="row">
			<div class="col-md-8 col-md-offset-2 text-center heading-section animate-box">
				<h3>最近案例</h3>
				<!--<p></p>-->
			</div>
		</div>
	</div>
	<div class="container">
		<?php
		$args = array(
			#'cat'=>'3,5,6,7,8,9,10,11,12,14,13',
			'category_name' => 'eye,nose,face,breast,dentistry,plant,micops,others,liposuction,fanny',
			'posts_per_page'    => 3,
			#'paged'             => get_query_var('page') //如果需要分页，则加上这一句
		); 
		$laseCase = new WP_Query($args);
		?>
		<div class="row">
			<?php
			if ( $laseCase->have_posts() ) {
				while ($laseCase->have_posts() ) {
					$laseCase->the_post();
					$category = get_the_category();
			?>
			<div class="col-md-4 animate-box">
				<div class="fh5co-blog">
					<a href="<?php echo get_category_link( get_cat_ID($category[0]->name) );?>"><img class="img-responsive" loading="lazy" src=" <?php the_post_thumbnail_url(); ?>"></a>
					<div class="blog-text">
						<div class="prod-title">
							<h3><?php the_title(); ?></h3>
							<p><?php the_excerpt();?></p>
							<?php
							echo '<a href="' . get_category_link( get_cat_ID($category[0]->name) ) . '">' .$category[0]->name.'</a>';
							?>
							<span class="posted_by"><?php the_time('Y-m-d'); ?></span>
						</div>
					</div> 
				</div>
			</div>
			<?php }?>
		</div>
		<?php
			}
		?>
	</div>
</div>

<div id="hers-lastnews" class="fh5co-section-gray">
	<div class="container">
		<div class="row">
			<div class="col-md-8 col-md-offset-2 text-center heading-section animate-box">
				<h3>赫思新闻</h3>
			</div>
		</div>
	</div>
	<div class="container">
		<?php
		$args1 = array(
			'category_name' => 'news',
			'posts_per_page'    => 6,
		); 
		$laseNews = new WP_Query($args1);
		?>
		<div class="row">
			<?php
			if ( $laseNews->have_posts() ) {
				while ($laseNews->have_posts() ) {
					$laseNews->the_post();
			?>
			<div class="col-md-4 animate-box hers-post">
				<div class="fh5co-blog">
					<div class="blog-text">
						<a href="<?php echo get_permalink()?>">
						<h3><?php the_title(); ?></h3>
						<?php the_excerpt(); ?>
						</a>
						<?php if(has_tag()){the_tags('');} ?>
						<span class="posted_by"><?php the_time('Y-m-d'); ?></span>
					</div> 
				</div>
			</div>
			<?php }?>
		</div>
		<?php
			}
		?>
	</div>
</div>